
// テスト定義
perf.regist({
  id : "test1. 初期表示までに1秒かかる",
  test: [
    perf.ops.load( "../samples/test1.html" ),
    perf.ops.wait( perf.exps.all(
      perf.exps.logged( "finished-1" )
    ))
  ]
});

perf.regist({
  id : "test2. 200kのページ",
  test: [
    perf.ops.load( "../samples/test2.html" ),
    perf.ops.wait( perf.exps.all(
      perf.exps.logged( "loaded-1" )
    ))
  ]
});

perf.regist({
  id : "test3. サイトの関数を実行",
  setup: [
     perf.ops.load( "../samples/test3.html" ),
     perf.ops.wait( perf.exps.logged( "loaded-1" ))
  ],
  test: [
    perf.ops.call( function( global ) {
      global.log( "a" ); 
      setTimeout( function(){
        global.log( "b" ); 
      }, 200);
      setTimeout( function(){
         global.log( "c" ); 
      }, 500);
    }),
    perf.ops.wait( perf.exps.all(
      perf.exps.logged( "end-a-1" ),
      perf.exps.logged( "end-b-1" ),
      perf.exps.logged( "end-c-1" )
    ))
  ]
});

perf.regist({
  id : "test4. タイムアウトする",
  test: [
    perf.ops.load( "../samples/test1.html" ),
    perf.ops.wait( perf.exps.logged( "not-called-1" ))
  ]
});